package top.stmo.stmoBlog.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import top.stmo.stmoBlog.dao.pojo.Link;
import top.stmo.stmoBlog.service.LinkService;

import java.util.List;

@Controller
public class LinkController {

    @Autowired
    private LinkService linkService;

    @GetMapping("link")
    public String link(Model model) {
        List<Link> linkList = linkService.findAllLink();
        model.addAttribute("linkList",linkList);
        return "link";
    }


}
